In binary computing devices hardware direct lookup tables are typically employed for function evaluation and for reciprocal and root reciprocal seed values for division and square root procedures. For direct table lookup of a function of a normalized “p” bit argument 1≦x=1.b1b2 . . . bibi+1 . . . bp-1<2, the “i” leading bits b1b2 . . . bi provide an index to a table yielding “j” output bits that determine the approximate function value.
The calculation of values of elementary functions usually uses a polynomial approximation method. The accuracy of the coefficients of the polynomial determines the accuracy of the calculated value of the function. The polynomial coefficients are usually stored in a “constant store” portion (or lookup table) of a “read only memory” of an arithmetic logic unit of a data processor.
The accuracy of the each polynomial coefficient depends upon the number of bits used to express the polynomial coefficient. In practice the last digit of each polynomial coefficient is rounded to give an approximate value of the coefficient.
Prior art methods separately round each individual polynomial coefficient of a function. Because each individual polynomial coefficients is rounded separately, rounding errors accumulate and contribute to value of the total rounded error of the function.
Accordingly, there is a need in the art for a method of rounding the polynomial coefficients of a function so that rounding errors are minimized for each polynomial coefficient of the function. There is also a need in the art for a method of rounding the polynomial coefficients of a function so that total accumulated rounding errors are minimized for the function.